package www.xudan.javabasedemo.model.Proxy.StaticProxy;

/**
 * Created by ${XuDan} on 2020/3/23.
 */
public class ProxyZuFang implements ZuFang {

    private ZuFang zf;

    public ProxyZuFang(ZuFang zf) {
        this.zf = zf;
    }


    @Override
    public void findfangzi() {
        System.out.println("我是中间代理:我可以找房子");
    }

    @Override
    public int zufang() {
        System.out.println("我是中间代理:我需要服务费");
        int zufang = zf.zufang();
        zufang = zufang - 200;
        return zufang;
    }


    @Override
    public void hetong() {
        System.out.println("我是中间代理:我准备合同");

    }
}
